fix(fullstack init --next): replace stale root README/CLAUDE.md, suppress noisy noConfirm hint#81
Merged
Conversation
…ress noisy noConfirm hint
When `lt fullstack init --next` runs, the workspace inherits root
README.md and CLAUDE.md from `lt-monorepo`, which describe the legacy
MongoDB + GraphQL + Mongoose + vendor-mode stack — none of which
applies to the new `nest-base` template (Bun + Prisma 7 + Postgres +
Better-Auth + REST). Leaving them in place poisoned every AI agent's
context (they're auto-loaded as repo orientation) and confused human
readers.
Changes:
- Add `src/templates/next-fullstack/`:
- `README.md.ejs` — minimal workspace overview pointing at projects/
- `CLAUDE.md.ejs` — routing card to subproject CLAUDE.md files +
explicit out-of-scope list (no GraphQL / Mongo / vendor-mode)
- `.claude/QUICKSTART.md.ejs` — 60-second agent onboarding card with
a routing table and the dev bring-up sequence
- `init.ts`: when `experimental` is true, render the next-fullstack
templates over the cloned `lt-monorepo`'s root files instead of just
patching `{{TEMPLATE_VAR}}` placeholders. Classic flow unchanged.
- `tools.nonInteractiveHint()`: skip the yellow hint when the caller
already passed `--noConfirm`. They're deliberately running headless
and don't need a "use parameters to skip prompts" reminder when they
already passed every parameter.
Friction-log entries fixed (from a fresh `--next` test run): root README
stale, root CLAUDE.md contradicts nest-base, root .claude/QUICKSTART.md
missing, "Hint: Non-interactive mode" prints with all flags supplied.
Tests: 153 passed.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three fixes that surfaced from a fresh
lt fullstack init --nexttest run, plus one supporting test-isolation patch.Bugs
Stale root README.md —
lt fullstack init --nextinherits the rootREADME.mdfromlt-monorepo, which describes the legacy MongoDB + lerna stack. None of it applies to the--nextproject (Bun + Prisma 7 + Postgres + Better-Auth + REST). Confuses humans, poisons AI agent context.Stale root CLAUDE.md — same issue. The cloned
CLAUDE.mdmentions `@lenne.tech/nest-server` npm-vs-vendor, `mongooseTenantPlugin`, GraphQL schema generation, `@UnifiedField` — all explicitly out of scope fornest-base. Because root `CLAUDE.md` is auto-loaded by Claude Code as repo orientation, this misleads every agent that opens the workspace.`Hint: Non-interactive mode detected` false positive —
tools.nonInteractiveHint()prints even when the caller already passed every required flag plus `--noConfirm`. Just noise in the output.(Supporting) Flaky `tests/git-commands.test.ts` — `isWorkingDirectoryClean` used `git status --porcelain` which counts untracked files. Parallel jest tests scatter `tests/temp-api-mode-*` directories during the run, breaking the check intermittently. `--untracked-files=no` fixes it. Also added a `hasUpstream` guard to the `lt git update` test — fresh feature branches before `git push -u` can't pull-rebase, which is a config gap, not a regression.
Changes
Add `src/templates/next-fullstack/` with three EJS templates:
`src/commands/fullstack/init.ts` — when `experimental` is true, render the `next-fullstack` templates over the cloned `lt-monorepo`'s root files instead of just patching the legacy `{{TEMPLATE_VAR}}` placeholders. Classic flow unchanged.
`src/extensions/tools.ts` — `nonInteractiveHint()` skips the yellow hint when the caller already passed `--noConfirm`.
`tests/git-commands.test.ts` — switch `isWorkingDirectoryClean` to `--untracked-files=no`, add `hasUpstream` guard.
Test plan
🤖 Generated with Claude Code